package cn.edu.sdjzu.xg23.kcsj01_backend.mapper;


import cn.edu.sdjzu.xg23.kcsj01_backend.entity.Employee;
import cn.edu.sdjzu.xg23.kcsj01_backend.entity.EmployeeAssProject;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EmployeeAssProjectMapper {
    // 根据专利id查询所有申报人
    List<EmployeeAssProject> getApplicantsByProjectId(Long peojectId);
    // 根据专利id查询第一申报人
    Employee getFirstApplicantByProjectId(Long projectId);
    boolean insertApplicants(@Param("list") List<EmployeeAssProject> list);

    @Delete("DELETE FROM employee_project WHERE project_id = #{projectId}")
    int delete(Long id);
}
